import { _get, _post } from "@/api/index";
import api from "@/api/api_address";

//书单列表
export const bookList = ({ data }) => {
    console.log("api==>", api);
    let req = {
        url: api.booklist,
        data,
    };
    return _get(req);
};

//书城展示模块
export const bookShow = ({ data }) => {
    let req = {
        url: api.show,
        data,
    };
    return _get(req);
};

//书城导航
export const bookNavi = ({ data }) => {
    let req = {
        url: api.navi,
        data,
    };
    return _get(req);
};

//书籍详情
export const bookGetsub = ({ data }) => {
    let req = {
        url: api.getsub,
        data,
    };
    return _get(req);
};

//章节列表
export const bookInfo = ({ data }) => {
    let req = {
        url: api.info,
        data,
    };
    return _get(req);
};

//章节内容
export const bookContent = ({ data }) => {
    let req = {
        url: api.content,
        data,
    };
    return _get(req);
};

//所有频道
export const bookStoreNode = ({ data = {} }) => {
    let req = {
        url: api.storeNode,
        data,
    };
    return _get(req);
};

//频道下的所有分类
export const bookStoreInfo = ({ data }) => {
    let req = {
        url: api.storeInfo,
        data,
    };
    return _get(req);
};

//分类筛选结果列表
export const bookSearchBook = ({ data }) => {
    let req = {
        url: api.searchbook,
        data,
    };
    return _get(req);
};

//热门搜索
export const bookHotSearch = ({ data }) => {
    let req = {
        url: api.hotsearch,
        data,
    };
    return _get(req);
};

//搜索结果列表
export const bookSearch = ({ data }) => {
    let req = {
        url: api.search,
        data,
    };
    return _get(req);
};

//书架推荐
export const shelfInfo = ({ data }) => {
    let req = {
        url: api.shelfInfo,
        data,
    };
    return _get(req);
};

//书籍评论列表
export const comments = ({ data }) => {
    let req = {
        url: api.comments,
        data,
    };
    return _get(req);
};

//排行榜列表
export const rankList = ({ data }) => {
    let req = {
        url: api.ranklist,
        data,
    };
    return _get(req);
};

export const bookOriginal = ({ data }) => {
    let req = {
        url: api.show,
        data,
    };
    return _get(req);
};
